#include "pool.hpp"
#include <unistd.h>

void test1(int data)
{
    printf("i am trest 1, data = %d\n", data);
}

void test2(int data)
{
    printf("i am trest 2, data = %d\n", data);
}

int main()
{
    Pool pl;
    pl.init_pool(3);
    for(int i = 0; i < 100; ++i){
        Data d1(i, test2);
        pl.Push(d1);
    }

    printf("i am main, i am end\n");
    
    pl.pool_exit();

    while(1)
    {
        sleep(1);
    }
    return 0;
}
